Skip to content

Use cartesian_stepper_alloc() for all cartesian like axes - #7442

Open
KevinOConnor wants to merge 1 commit into
masterfrom
work-cartesian-20261125
Open

KevinOConnor wants to merge 1 commit into
masterfrom
work-cartesian-20261125

Conversation

@KevinOConnor

Copy link
Copy Markdown
Collaborator

Utilize the "generic cartesian" low-level C calc_position code for all cartesian like axes.

Implement optimized versions of calc_position() for simple cartesian and standard corexy axes.

Rename the kin_generic.c file to kin_cartesian.c, and remove kin_corexy.c and kin_corexz.c .

@dmbutyugin - fyi.

-Kevin

@MRX8024

MRX8024 commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

One small thing, corexz kinematics lost its dedicated callbacks. The (1, 0, 1) and (1, 0, -1) coefficients used by corexz.py and hybrid_corexz.py now go through the generic cartesian_stepper_calc_position(). The results are identical, but it may be worth adding the two corexz cases next to the corexy ones, to keep parity with the old kin_corexz.c.

It might also be worth updating docs/Code_Overview.md to address references to older kinematics.

-Maksim

Utilize the "generic cartesian" low-level C calc_position code for all
cartesian like axes.

Implement optimized versions of calc_position() for simple cartesian
and standard corexy axes.

Rename the kin_generic.c file to kin_cartesian.c, and remove
kin_corexy.c and kin_corexz.c .

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
@KevinOConnor
KevinOConnor force-pushed the work-cartesian-20261125 branch from c919aed to 4ec479f Compare November 30, 2026 02:01
@KevinOConnor

Copy link
Copy Markdown
Collaborator Author

Thanks for reviewing.

In regard to kin_corexz.c I don't think we need to implement optimized versions. It's a micro-optimization and these printers aren't particularly common (at least relative to cartesian and corexy).

I updated this PR to include some changes to Code_Overview.md . Thanks for pointing that out.

Cheers,
-Kevin

Comment thread docs/Code_Overview.md
seconds) to a cartesian coordinate (in millimeters), and then
calculate the desired stepper position (in millimeters) from that
cartesian coordinate.
stepper if they are not already available (see kin_cartesian.c, and

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: stray comma in "see kin_cartesian.c, and kin_delta.c".

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants